package com.jq.mybatisspringbootdemo.mapper;

import com.jq.mybatisspringbootdemo.entity.User;
import com.jq.mybatisspringbootdemo.entity.User2;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


public interface UserMapper {
    User findById(long id);
    User findByUsernameAndPassword(@Param("username") String username, @Param("password")String password);
    int insertUser(User user);
    List<User> findUsersByMap(Map<String, Object> params);
    List<User> findByIds(@Param("idList") List<Long> ids);

    List<User2> findAllWithResultMap();

    User2 findUserWithOrders(long userId);

    List<User> findUsersDynamically(User user);

    int updateUserDynamically(User user);

    List<User> findUserByChoice(User user);

    int insertUsersBatch(@Param("userList") List<User> users);

    List<User> findAll();
}
